package com.own.component.store.core.em;

import com.own.base.BaseResponseCode;
import lombok.AllArgsConstructor;

/**
 * StoreExceptionEnum
 *
 * @author chenxueli
 * @date 2022-06-15 03:14:15
 */
@AllArgsConstructor
public enum StoreExceptionEnum implements BaseResponseCode {

    /**
     * 统一缓存中心处理异常
     */
    DEFAULT("store_error", "统一缓存中心处理异常"),


    PUBLIC_KEY_IS_NULL("public_key_is_null", "公钥为空，请先获取秘钥"),
    PRIVATE_KEY_IS_NULL("private_key_is_null", "私钥为空，请先获取秘钥"),
    SIGN_IS_NULL("sign_is_null", "秘钥key为空，请先获取秘钥"),
    SIGN_IS_TOO_LONG("sign_is_too_long", "秘钥key超长"),

    ;

    /**
     * 返回状态码
     */
    private final String code;

    /**
     * 描述
     */
    private final String desc;

    /**
     * 获取返回信息
     *
     * @return 返回code
     */
    @Override
    public String code() {
        return this.code;
    }

    /**
     * 获取描述
     *
     * @return 返回描述
     */
    @Override
    public String desc() {
        return this.desc;
    }

}
